package org.jeecg.board.controller;/**
 * @Description
 * @Author LiCY
 * @Date 2023/4/24
 */

import com.baomidou.dynamic.datasource.annotation.DS;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.board.service.LineBoardService;
import org.jeecg.common.api.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 功能描述：
 *
 * @author: LCY
 * @date: 2023年04月24日 13:56
 */
@Api(tags = "产线看板")
@RestController
@Slf4j
@RequestMapping("/board/lineBoard")
public class LineBoardController {

    @Autowired
    private LineBoardService lineBoardService;

    /**
     * 获取产线看板数据
     *
     * @param param
     * @return
     */
    @ApiOperation(value = "获取产线看板数据", notes = "获取产线看板数据")
    @GetMapping(value = "/getBoardData")
    @DS("history")
    public Result<Map<String, Object>> getBoardData(@RequestParam Map<String, Object> param) {
        return lineBoardService.getBoardData(param);
    }

    /**
     * 获取产线看板数据
     *
     * @param param
     * @return
     */
    @ApiOperation(value = "获取产线看板数据", notes = "获取产线看板数据")
    @GetMapping(value = "/getBoardData2")
    @DS("history")
    public Result<Map<String, Object>> getBoardData2(@RequestParam Map<String, Object> param) {
        return lineBoardService.getBoardData2(param);
    }

    /**
     * 获取产线看板数据
     *
     * @param param
     * @return
     */
    @ApiOperation(value = "获取质量产线看板数据", notes = "获取产线看板数据")
    @GetMapping(value = "/getQualityBoardData")
    @DS("history")
    public Result<Map<String, Object>> getQualityBoardData(@RequestParam Map<String, Object> param) {
        return lineBoardService.getQualityBoardData(param);
    }

    /**
     * 获取产线看板数据
     *
     * @param param
     * @return
     */
    @ApiOperation(value = "获取产线看板产量数据", notes = "获取产线看板产量数据")
    @GetMapping(value = "/getLineBoardProductionData")
    @DS("history")
    public Result<Map<String, Object>> getLineBoardProductionData(@RequestParam Map<String, Object> param) {
        return lineBoardService.getLineBoardData(param);
    }
}
